package com.roadjava.rbac.service;

import com.roadjava.rbac.bean.entity.UserDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.roadjava.rbac.bean.req.user.*;
import com.roadjava.rbac.bean.res.Result;
import com.roadjava.rbac.bean.vo.OnlineUserVO;
import com.roadjava.rbac.bean.vo.UserVO;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.List;

public interface UserService extends IService<UserDO> {


    UserVO queryById(Long id);


    UserDetails loadUserByUsername(String username);


    void modifyById(UserUpdateReq updateReq);


    void updatePwd(UpdatePwdReq updatePwdReq);


    void add(UserAddReq addReq);

    void deleteById(Long id);


    void assignRole(AssignRoleReq assignRoleReq);

    Result<List<UserVO>> queryPage(UserPageReq pageReq);


    void register(UserRegisterReq registerReq);


    void updateUserInfo(UserUpdateReq2 user);

    Long postRoleByUser(long id);

    List<UserDO> getList(UserDO user);

    List<OnlineUserVO> queryUserOnline();
}
